public class Test {



    public static void main1(String[] args) {

        //printNum(1234);
     //   System.out.println(facNum(10));
     //    System.out.println(suiNum(1234));
//        System.out.println(fbnq2(10));
//        System.out.println(count);

    }
 public static int count = 1 ;
    public static int fbnq2(int n){
        if(n == 1){
            return 0 ;
        }
        if(n == 2 || n == 3) {
            return 1;
        }
        int num = 1 ;
        int sum = 1 ;
        while(n - 3 != 0){
            count ++ ;
            int tmp  = sum ;
            sum = sum + num ;
            num = tmp ;
            n -- ;
        }
        return sum ;
    }
    public static int fbnq(int n){

       if(n == 1 ) {
           return 0;
       }
        if(n == 2){
            return 1 ;
        }
        int sum = fbnq(n - 1) + fbnq(n - 2) ;
        return sum ;
    }

    public static int suiNum(int n){
        if(n < 10){
            return n ;
        }
        int sum = suiNum(n / 10) + n % 10 ;

        return sum ;

    }



    public static int facNum(int n){
        if(n == 1){
            return n ;
        }
        return n + facNum(n - 1) ;
    }

    public static void printNum(int n){
        if(n < 10 ){
            System.out.print(n + "  ");
            return ;
        }
        printNum(n / 10) ;
        System.out.print(n % 10 + "  ");

    }

}
